<?php 
	echo form_open('m_tholabah/update', array('id' => 'UpdateTholabah')); 
	foreach ($list as $row){ 
?>
<div class="row">
	<div class="col-md-6">
		<input type="hidden" value="<?php echo $row->id_m_tholabah;?>" name="id_m_tholabah"/>						
		<input type="text" value="<?php echo $row->nama_lengkap;?>" name="nama_lengkap" class="form-control form-elba input-sm clearable" placeholder="Nama Lengkap"/><br/>							
		<input type="hidden" id="id_m_j_pendidikan" name="id_m_j_pendidikan" value="<?php foreach ($list_jp as $row_jp) {echo $row_jp->id_m_j_pendidikan;}?>"/>						
		<div class="radioForm">
		<label class="radio-inline" id="radioCustom">
			<input type="radio" name="jk" value="Laki-laki" <?php if ($row->jk == 'Laki-laki'){echo "checked";} ?>> <labelnya>Laki-laki</labelnya>
		</label>
		<label class="radio-inline" id="radioCustom">
			<input type="radio" name="jk" value="Perempuan" <?php if ($row->jk == 'Perempuan'){echo "checked";} ?>> <labelnya>Perempuan</labelnya>
		</label>
		</div><br/>
		<div class="input-group">
			<input type="text" value="<?php echo $row->tmp_lahir;?>" name="tmp_lahir" class="form-control form-elba input-sm clearable" placeholder="Tempat lahir">
			<span class="input-group-addon group-addon-elba-tengah group-addon-elba b-hijau-muda ">pada tanggal</span>
			<input type="text" id="tgl1" value="<?php echo date("d/m/Y",strtotime($row->tgl_lahir));?>" name="tgl_lahir" class="form-control form-elba input-sm inputmask-cal clearable" placeholder="Tanggal lahir">
		</div><br/>
		<div class="input-group">
			<span class="input-group-addon group-addon-elba b-hijau-muda ">Anak ke</span>
			<input type="text"  value="<?php echo $row->anak_ke;?>" name="anak_ke" class="form-control form-elba input-sm clearable" placeholder="#">
			<span class="input-group-addon group-addon-elba-tengah group-addon-elba b-hijau-muda ">dari</span>
			<input type="text"  value="<?php echo $row->jml_bersaudara;?>" name="jml_bersaudara" class="form-control form-elba input-sm clearable" placeholder="#">
			<span class="input-group-addon group-addon-elba b-hijau-muda ">bersaudara</span>
		</div><br/>
		<div class="input-group">
		<span class="input-group-addon group-addon-elba b-hijau-muda ">Ijazah terakhir</span>
		<select name="ijazah_terakhir" class="form-control form-elba input-sm">
			<?php 
			foreach ($list_it->result() as $row_p){ 
			
				if($row_p->id_m_pendidikan==$list[0]->ijazah_terakhir){
				?>
					<option selected value="<?php echo $row_p->id_m_pendidikan; ?>"><?php echo $row_p->pendidikan; ?></option>
				<?php
				}else{
				?>
					<option value="<?php echo $row_p->id_m_pendidikan; ?>"><?php echo $row_p->pendidikan; ?></option>							
				<?php
				}
			}; 
			?>
		</select>
		</div>
		<br/>	
		<input type="text" id="tgl2" value="<?php echo date("d/m/Y",strtotime($row->tgl_reg));?>" name="tgl_reg" class="form-control form-elba input-sm clearable" placeholder="Tanggal Registrasi"/><br/>						
		<textarea name="alamat" class="form-control form-elba input-sm clearable" placeholder="Alamat tholabah"><?php echo $row->alamat;?></textarea><br/><br/>
	</div>
	<div class="col-md-6">
		<input type="text"  value="<?php echo $row->nama_ayah;?>" name="nama_ayah" class="form-control form-elba input-sm clearable" placeholder="Nama Ayah"/><br/>	
		<div class="input-group">
		<span class="input-group-addon group-addon-elba b-hijau-muda ">Pekerjaan Ayah</span>
		<select name="kerja_ayah" class="form-control form-elba input-sm">
			<?php 
			foreach ($list_pk->result() as $row_pkA){ 
			
				if($row_pkA->id_m_pekerjaan==$list[0]->kerja_ayah){
				?>
					<option selected value="<?php echo $row_pkA->id_m_pekerjaan; ?>"><?php echo $row_pkA->pekerjaan; ?></option>
				<?php
				}else{
				?>
					<option value="<?php echo $row_pkA->id_m_pekerjaan; ?>"><?php echo $row_pkA->pekerjaan; ?></option>							
				<?php
				}
			}; 
			?>
		</select>
		</div>
		<br/>
		<input type="tel"  value="<?php echo $row->no_tlp_ayah;?>" name="no_tlp_ayah" class="tel form-control form-elba input-sm bfh-phone clearable" data-format="+62 ddd-dddd-dddd" placeholder="No. Hp/Tlp Ayah"/><br/>
		<input type="text"  value="<?php echo $row->nama_ibu;?>" name="nama_ibu" class="form-control form-elba input-sm clearable" placeholder="Nama Ibu"/><br/>	
		<div class="input-group">
		<span class="input-group-addon group-addon-elba b-hijau-muda ">Pekerjaan Ibu</span>
		<select name="kerja_ibu" class="form-control form-elba input-sm">
			<?php 
			foreach ($list_pk->result() as $row_pkI){ 
			
				if($row_pkI->id_m_pekerjaan==$list[0]->kerja_ibu){
				?>
					<option selected value="<?php echo $row_pkI->id_m_pekerjaan; ?>"><?php echo $row_pkI->pekerjaan; ?></option>
				<?php
				}else{
				?>
					<option value="<?php echo $row_pkI->id_m_pekerjaan; ?>"><?php echo $row_pkI->pekerjaan; ?></option>							
				<?php
				}
			}; 
			?>

		</select>
		</div>
		<br/>
		<input type="tel" value="<?php echo $row->no_tlp_ibu;?>" name="no_tlp_ibu" class="tel form-control form-elba input-sm bfh-phone clearable" data-format="+62 ddd-dddd-dddd" placeholder="No. Hp/Tlp Ibu"/><br/>
		<textarea name="alamat_ortu" class="form-control form-elba input-sm clearable" placeholder="Alamat orang tua"><?php echo $row->alamat_ortu;?></textarea><br/><br/>
	</div>	
</div>

<span id="loadingAdd" style="display:none;">Sedang memproses..</span>
<span id="errorAdd" style="display:none;color:red;">Ma'af, gagal mengupdate data</span>
<span class="pull-right">
	<button type="submit" class="btn btn-xs tmb-utama"> Simpan</button> 
	<button class="btn tmb-kedua close-reveal-modal close-modal"> Batal</button>
</span>
<?php 
	}
	echo form_close();
?>